﻿using A.M.Storage.Application;
using Newtonsoft.Json;
using Public_Class_Library;
using Q.M.Finance.Application.IServices;
using Q.M.Finance.Domain.Entity;
using Q.M.Finance.Infrastruecure.IRepository;
using Q.M.Sell.Doamin.Entity;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Q.M.Finance.Application.Services
{
    public class Client_payer_informationServices : BaseServices<client_payer_information, string>, IClient_payer_informationServices
    {
        private readonly IClient_payer_informationRepository client_Payer_InformationRepository;
        private readonly Cross_service_Helper cross_Service_Helper;
        public Client_payer_informationServices(IClient_payer_informationRepository client_Payer_InformationRepository, Cross_service_Helper cross_Service_Helper) : base(client_Payer_InformationRepository)
        {
            this.client_Payer_InformationRepository = client_Payer_InformationRepository;
            this.cross_Service_Helper = cross_Service_Helper;                                        
        }
        /// <summary>
        /// 显示客户信息
        /// </summary>
        /// <returns></returns>
        public async Task<List<client_payer_information>> GetpayerInfo()
        {
            var payer= await client_Payer_InformationRepository.GetShowInforAsync();
            return payer;
        }
        /// <summary>
        /// 反填客户信息
        /// </summary>
        /// <param name="customerid"></param>
        /// <returns></returns>
        public async Task<client_payer_information> FindpayerInfo(int customerid)
        {
            var id = await client_Payer_InformationRepository.GetShowObjAsync(x=>x.customerid == customerid);
            return id;
        }
       

    }
}
